import React, { Component } from 'react';
import { withRouter } from "react-router-dom"


class Mine extends Component {
    gocollection(){
        this.props.history.push('/collection');
    }
    render() {
        var userinfo = JSON.parse(localStorage.getItem('userinfo'))
        return (
            <div className='mine'>
                <div className="header">
                    <img src={userinfo.avatarUrl} alt="" />
                    <div className="name"> 九亿少女的梦 </div>
                </div>
                <div className="main">
                    <div className="main-top">
                    <div className="shouchang" onClick={()=>{this.gocollection()}}>收藏</div>
                    <div className="jifen">积分</div>
                    <div className="youhui">优惠券</div>
                    </div>
                    <div className="main-dingdan">
                        <div className="titel">
                            <h4>我的订单</h4>
                            <span>查看全部订单</span>
                        </div>
                        <div className="btn">
                            <span>待付款</span>
                            <span>待发货</span>
                            <span>已发货</span>
                            <span>待评价</span>
                        </div>
                    </div>
                    <div className="huiyuan">会员中心
                    </div>
                    <div className="main-bottom">
                        <div>领券中心</div>
                        <div>我的评价</div>
                        <div>收货地址</div>
                        <div>我的客服</div>
                    </div>
                </div>
            </div>
        );
    }
}

export default withRouter(Mine);
